# _*_ coding=utf-8 _*_
from selenium.webdriver.common.by import By


class StaffCodeLocators(object):
    """
    员工活码页面节点定位
    """
    code_add_btn = (By.XPATH, '//*[contains(text(),"新建活码")]')  # 新建活码按钮

    code_add_name = (By.XPATH, '//*[@placeholder= "请输入活码名称"]')  # 活码名称输入框

    code_autoAccept = (By.XPATH, '//*[@id= "currentEditCode_autoAccept"]')

    code_select_user = (By.XPATH, '//*[text()="选择员工"]')

    code_edit_user = (By.XPATH, '//*[@class="ant-btn ant-btn-default undefined"]')

    code_img_upload = (By.XPATH, '//*[text()="选择图片"]')

    code_img_input = 'currentEditCode_codeStyleUrl'

    code_channe = (By.XPATH, "//*[@id='currentEditCode_channelId']")

    code_create_btn = (By.XPATH, '//*[text()="确 定"]')
    # code_create_btn = """document.evaluate('//*[text()="确 定"]', document).iterateNext().click();"""

    code_success_msg = (By.XPATH, '//*[@class="ant-message-custom-content ant-message-success"]')

    # 编辑
    code_edit_btn = (By.XPATH, '//a[text()="编辑"]')

    # 删除
    code_del_btn = (By.XPATH, '//span[contains(text(),"pytest")]/../../../..//a[contains(text(),"删除")]')

    code_del_sure = (By.XPATH, '//*[@class="ant-modal-content"]//span[text()="确 定"]')
